﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASPNETVN.PORTAL.Components.Configuration.Settings;
using ASPNETVN.PORTAL.Components.UI;
using ASPNETVN.PORTAL.Components.Helpers;
using ASPNETVN.PORTAL.Components.UI.DataTypes;

namespace QLC.Modules.TDHS
{
    public partial class Main : PortalModuleControl
    {

        public Main()
        {
            // Cách thức lưu trữ file upload.
            ArrayList listStorageType = new ArrayList();
            listStorageType.Add(new ListItem("Link", "LINK"));
            listStorageType.Add(new ListItem("File", "FILE"));
            listStorageType.Add(new ListItem("Database", "DATABASE"));

            ModuleSettingItem storageType = new ModuleSettingItem(new CustomListDataType(listStorageType, "Text", "Value"));
            storageType.Value = "DATABASE";
            storageType.Name = "Storage Type";
            storageType.Description = "Storage Type";
            storageType.SortOrder = 8;
            this.BaseSettings.Add("StorageType", storageType);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.ModuleTitle.AddUrl = HttpUrlBuilder.BuildAddEditUrl(this.ModuleID, 0, "AddEditItem");
            hfModuleID.Value = this.ModuleID.ToString();
        }
    }
}